classdef sensor_body_dynamic  % 
   properties
       angle_mask = 5 ;  % 卫星频率
       describ = "自己创建的传感器载体";
       satpos_obs;
       sat_obs;
       angle_obs;
       doppler_obs;
       pseudorange_obs;
       noise_obs = 0.1;
       trajectorys;
       mean_vel;
       receiver_clock_drift = 10e-6;
       f_obs;
       ini_vel;
       ini_pos;
       aircraft
       DDOP;
       LS_position_result;
       My_method_position_result;
       Traditional_position_result;
       my_PT;
       tradition_PT;
       num_of_epoch;
       cond;
       delta;
       EKF;
   end
   methods
       %构造函数
       function obj = sensor_body_dynamic(trj)
          global sc
            obj.aircraft = satellite(sc,trj.PT, ...
                CoordinateFrame="geographic", Name="Aircraft");
            obj.trajectorys = trj;
            obj.ini_pos = lla2ecef(trj.PT...
            {:, "Lat-Lon-Alt"}(1,:));
            obj.ini_vel = trj.vel(1,:);
            obj.mean_vel = norm(mean(abs(trj.vel)));
            disp('动态传感器完成初始化');
            disp(['平均速度',num2str(obj.mean_vel),'m/s']);
       end
       %函数申明
      obj = get_sat_angle(obj,sat)
      obj = Doppler_position_using_Least_Squares(obj,ini_pos)
      obj = Doppler_velocity_position_using_LS(obj,ini_pos,ini_vel,epoch)
      obj = Doppler_position_using_EKF(obj,ini_pos,ini_vel)
      obj = My_method_for_Doppler_position_based_on_LS(obj,ini_pos);
      obj = My_method_for_Doppler_velocity_position_based_on_LS(obj,ini_pos,inivel,epoch);
      [posjieguo,veljieguo] = error_analysis(obj,coordinate,jieguo,chousenum);
      obj = Traditional_regularization_method(obj,ini_pos,ini_vel);
      obj = draw_trajectory_comparison(obj,mode,sat);
   end    
end
